﻿@model Apps.Models.WMS.WMS_SupplierModel
@using Apps.Web.Core;
@using Apps.Common;
@using Apps.Models.WMS;
@using Apps.Web;
@using Apps.Locale;
@using Apps.Models.Sys;
@{
    ViewBag.Title = "修改";
    Layout = "~/Views/Shared/_Index_LayoutEdit.cshtml";
    List<permModel> perm = null;
}

<script type="text/javascript">
$(function () {
    $("#btnSave").click(function () {
        if ($("form").valid()) {
            $.ajax({
                url: "@Url.Action("Edit")",
                type: "Post",
                data: $("form").serialize(),
                dataType: "json",
                success: function (data) {
                    if (data.type == 1) {
                        window.parent.frameReturnByMes(data.message);
                        window.parent.frameReturnByReload(false);
                        window.parent.frameReturnByClose()
                    }
                    else {
                        window.parent.frameReturnByMes(data.message);
                    }
                }
            });
        }
        return false;
    });
    $("#btnReturn").click(function () {
         window.parent.frameReturnByClose();
    });
});
function frameReturnByClose() {
$("#modalwindow").window('close');
}
function frameReturnByMes(mes) {
$.messageBox5s(Lang.Tip, mes);
}
</script>
<div id="modalwindow" class="easyui-window" style="width:800px; height:450px;" data-options="modal:true,closed:true,minimizable:false,shadow:false"></div>
<div class="mvctool bgb">
@Html.ToolButton("btnSave", "fa fa-save", Resource.Save,ref perm, "Save", true)
@Html.ToolButton("btnReturn", "fa fa-reply", Resource.Reply,false)
</div>
@using (Html.BeginForm())
{
             @Html.HiddenFor(model => model.Id)
             @Html.HiddenFor(model => model.CreateTime)
             @Html.HiddenFor(model => model.CreatePerson)
 <table class="formtable">
     <tbody>
         <tr>
             <th>
                 @Html.LabelFor(model => model.SupplierCode)：
             </th>
             <td>
                 @*@Html.EditorFor(model => model.SupplierCode)*@
                 @Html.ReadOnlyTextBoxFor(model => model.SupplierCode, (bool)ViewBag.EditStatus)
             </td>
             <td>@Html.ValidationMessageFor(model => model.SupplierCode)</td>
         </tr>
         <tr>
             <th>
                 @Html.LabelFor(model => model.SupplierShortName)：
             </th>
             <td>
                 @Html.EditorFor(model => model.SupplierShortName)
             </td>
             <td>@Html.ValidationMessageFor(model => model.SupplierShortName)</td>
         </tr>
         <tr>
             <th>
                 @Html.LabelFor(model => model.SupplierName)：
             </th>
             <td>
                 @Html.EditorFor(model => model.SupplierName)
             </td>
             <td>@Html.ValidationMessageFor(model => model.SupplierName)</td>
         </tr>
         <tr>
             <th>
                 @Html.LabelFor(model => model.SupplierType)：
             </th>
             <td>
                 @*@Html.EditorFor(model => model.SupplierType)*@
                 @Html.DropDownListFor(model => model.SupplierType, Apps.BLL.Sys.SysParamBLL.GetSysParamByType("SupplierType"))
             </td>
             <td>@Html.ValidationMessageFor(model => model.SupplierType)</td>
         </tr>
         <tr>
             <th>
                 @Html.LabelFor(model => model.LinkMan)：
             </th>
             <td>
                 @Html.EditorFor(model => model.LinkMan)
             </td>
             <td>@Html.ValidationMessageFor(model => model.LinkMan)</td>
         </tr>
         <tr>
             <th>
                 @Html.LabelFor(model => model.LinkManTel)：
             </th>
             <td>
                 @Html.EditorFor(model => model.LinkManTel)
             </td>
             <td>@Html.ValidationMessageFor(model => model.LinkManTel)</td>
         </tr>
         <tr>
             <th>
                 @Html.LabelFor(model => model.LinkManAddress)：
             </th>
             <td>
                 @Html.EditorFor(model => model.LinkManAddress)
             </td>
             <td>@Html.ValidationMessageFor(model => model.LinkManAddress)</td>
         </tr>
         <tr>
             <th>
                 @Html.LabelFor(model => model.MoreAccept)：
             </th>
             <td>                
                 @Html.DropDownListFor(model => model.MoreAccept, Apps.BLL.Sys.SysParamBLL.GetSysParamByType("MoreAccept"))
             </td>
             <td>@Html.ValidationMessageFor(model => model.MoreAccept)</td>
         </tr>
         <tr>
             <th>
                 @Html.LabelFor(model => model.Status)：
             </th>
             <td>
                 @*@Html.EditorFor(model => model.Status)*@
                 @Html.DropDownListFor(model => model.Status, Apps.BLL.Sys.SysParamBLL.GetSysParamByType("Status"))
             </td>
             <td>@Html.ValidationMessageFor(model => model.Status)</td>
         </tr>
         <tr>
             <th>
                 @Html.LabelFor(model => model.Remark)：
             </th>
             <td>
                 @Html.EditorFor(model => model.Remark)
             </td>
             <td>@Html.ValidationMessageFor(model => model.Remark)</td>
         </tr>
         @*<tr>
            <th>
                @Html.LabelFor(model => model.CreatePerson)：
            </th>
            <td >
                @Html.EditorFor(model => model.CreatePerson)
            </td>
            <td>@Html.ValidationMessageFor(model => model.CreatePerson)</td>
        </tr>
        <tr>
            <th>
                @Html.LabelFor(model => model.ModifyPerson)：
            </th>
            <td >
                @Html.EditorFor(model => model.ModifyPerson)
            </td>
            <td>@Html.ValidationMessageFor(model => model.ModifyPerson)</td>
        </tr>
        <tr>
            <th>
                @Html.LabelFor(model => model.ModifyTime)：
            </th>
            <td >
               @Html.TextBoxFor(model => model.ModifyTime, new { @onClick = "WdatePicker()",@style = "width: 105px" })
            </td>
            <td>@Html.ValidationMessageFor(model => model.ModifyTime)</td>
        </tr>*@
     </tbody>
</table>
}

